package au.com.zonski.gwlite.j2me.client;

public interface Controller 
{
	/**
	 * resets the controller to it's initial state
	 */
	void reset();
	
	/**
	 * updates the object
	 * @param o the object
	 * @param gameState gameState
	 * @return true if the object should be removed
	 */
	boolean update( GWLiteCanvas gameState, GWEntity o );
	
	/**
	 * extrapolates any important information about the state of the game
	 * for use in updating the entities
	 * @param gameState the game state
	 */
	void learn( GWLiteCanvas gameState );
	
	/**
	 * handles the collision between the controlled object and the with object 
	 * @param controlled the object controlled by this controller 
	 * @param with the object it collided with
	 * @param gameState the game state
	 * @return true if the controlled object should be removed
	 */
	boolean collision( GWLiteCanvas gameState, GWEntity controlled, GWEntity with );
}
